<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>飞桨离线翻译</title>
    <link rel="stylesheet" href="styles/popup.css">
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>飞桨离线翻译</h1>
            <div class="logo">🚀</div>
        </div>
        
        <div class="translation-area">
            <div class="input-section">
                <label for="sourceText">英文输入：</label>
                <textarea id="sourceText" placeholder="请输入要翻译的英文文本..."></textarea>
            </div>
            
            <div class="control-section">
                <button id="translateBtn" class="translate-btn">
                    <span>翻译</span>
                    <div class="loading" id="loading" style="display: none;">
                        <div class="spinner"></div>
                    </div>
                </button>
                <button id="clearBtn" class="clear-btn">清除</button>
            </div>
            
            <div class="page-translate-section">
                <button id="translatePageBtn" class="translate-page-btn">
                    <span>🌐 翻译整个网页</span>
                    <div class="loading" id="pageLoading" style="display: none;">
                        <div class="spinner"></div>
                    </div>
                </button>
            </div>
            
            <div class="output-section">
                <label for="targetText">中文翻译：</label>
                <textarea id="targetText" placeholder="翻译结果将显示在这里..." readonly></textarea>
            </div>
        </div>
        
        <div class="status-bar">
            <div class="model-status">
                <span class="status-indicator" id="modelStatus">●</span>
                <span id="statusText">模型加载中...</span>
            </div>
            <div class="usage-tip">
                💡 提示：右键选中网页文本可快速翻译
            </div>
        </div>
    </div>
    
    <script src="popup.js"></script>
</body>
</html>